import { http } from "@/utils/http";
type ResultTable = {
  success: boolean;
  data?: {
    /** 列表数据 */
    list: Array<any>;
    /** 总条目数 */
    total?: number;
    /** 每页显示条目个数 */
    pageSize?: number;
    /** 当前页数 */
    currentPage?: number;
  };
};
type Result = {
  success: boolean;
  data?: Array<any>;
};
export const getItems = (data?: object) => {
  return http.request<ResultTable>("post", "/items", { data });
};

export const getRoleMenuIds = (data?: object) => {
  return http.request<Result>("post", "/role-menu-ids", { data });
};

export const getDeptList = (data?: object) => {
  return http.request<Result>("post", "/dept", { data });
};

export const getRoleMenu = (data?: object) => {
  return http.request<Result>("post", "/role-menu", { data });
};

export const getRoleList = (data?: object) => {
  return http.request<ResultTable>("post", "/role", { data });
};

export const getClassify = (data?: object) => {
  return http.request<Result>("post", "/classify", { data });
};

export const getKeywords = (data?: object) => {
  return http.request<ResultTable>("post", "/keywords", { data });
};
